package com.ruoyi.mapper;

import java.util.List;

import com.ruoyi.domain.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 积分Mapper接口
 * 
 * @author fst
 * @date 2025-04-14
 */
@Mapper
public interface PointsMapper 
{
    /**
     * 查询积分
     * 
     * @param id 积分主键
     * @return 积分
     */
    public Points selectPointsById(Long id);

    /**
     * 查询积分列表
     * 
     * @param points 积分
     * @return 积分集合
     */
    public List<Points> selectPointsList(Points points);

    /**
     * 新增积分
     * 
     * @param points 积分
     * @return 结果
     */
    public int insertPoints(Points points);

    /**
     * 修改积分
     * 
     * @param points 积分
     * @return 结果
     */
    public int updatePoints(Points points);

    /**
     * 删除积分
     * 
     * @param id 积分主键
     * @return 结果
     */
    public int deletePointsById(Long id);

    /**
     * 批量删除积分
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePointsByIds(Long[] ids);

    PointsDTO getPointsByUserId(Long userId);

    UserVO getUserName(Long userId);

    String getName(Long userId);

    Long selectPointsByUserId(Long userId);

    int updatePointsByUserId(@Param("points") Long points, @Param("userId")Long userId);

    Long selectNovelId(String novelName);

    Long selectChapterId(@Param("orderNum")String orderNum, @Param("novelId")Long novelId);

    int insertPointsMany(List<Subscribe> subscribe);

    int insertOrder(Order order);

    List<Long> selectChapterIds(Long novelId);

    List<Subscribe> selectSubscribeListByUserId(@Param("userId")Long userId,@Param("novelId") Long novelId);

    Directory selectChapterList(Long id);

    int updateNovelPoints(@Param("novelId")Long novelId,@Param("points") Long points);

    int updateNovelPass(@Param("pass")Long pass, @Param("novelId")Long novelId);

    List<Long> selectNovelTippingList(Long userId);

    List<Long> selectNovelPassList(Long userId);
}
